import { createRouter, createWebHistory } from 'vue-router'
import Home from '../components/Home.vue'
import User from '../components/User.vue'
import Stu from '../components/Stu.vue'
import Book from '../components/Book.vue'
import Profile from '../components/Profile.vue'

const routes = [
  { path: '/', name: 'Home', component: Home },
  { path: '/book', name: 'Book', component: Book },
  { path: '/profile', name: 'Profile', component: Profile },
  { path: '/stu/:id', name: 'Stu', component: Stu },
  { path: '/user/:id', name: 'User', component: User }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
